[Main]
Name=Smart Anti-Spam
Author=Darvon Mitsumura
D1=This is an anti-spamming script that is capable of detecting too many posts from one furre at a time and warning them. If they so much as continue to post at the rate of 6 messages in 4 seconds, the furre would be temporarly banned from the dream for a set period of 2 minutes or more.
D2=
D3=Thanks to the string update, the smart anti-spam ds just got even smarter and is now capable of judging furres on a more long term scale. But that is not all it does. On this long term scale, it is capable of rating each message of a furre's post, depending on it's size, and from that size it is able to determine the threat level in which to extend upon the current furre. So the more larger posts the furre makes within a set amount of time, the quicker the threat level reaches critical and decides to boot the furre.
D4=
D5=Thanks to the silent prefix, this script allows for furres to use commands without them being counted towards their spam count.
V1=Silent Prefix
T1=Silent Prefix
B1=!

[Code]
*Startup* (Place "*Startup*" section at top of dragonspeak editor to prevent variable issues!)
(0:0) When everything is starting up,
    (5:399) clear all variables to zero.

*-=Smart Anti-Spam Ds v. Two=-
*By Darvon Mitsumura
(0:9) When a furre arrives in the dream,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
    (5:200) emit message {***This Dream is Anti-Spam Enabled***} to the triggering furre.

(0:100) When 1 seconds have passed, offset by 0,
 (1:620) and the PhoenixSpeak info {penalty2} about this dream is equal to 0,
    (5:602) memorize that the PhoenixSpeak info {penalty2} about this dream will now be 1.

*Spam counter*
(0:32) When a furre says something with {^1^} in it,
    (5:255) set message ~nospam to what the triggering furre just said or emoted.
    (5:270) chop off the end of message ~nospam, leaving just the first 1 characters of it still there.

(0:32) When a furre says something with {^1^} in it,
 (1:75) and message ~nospam contains {^1^} somewhere within it,
    (5:300) set variable %ignore.x to the value 1.

(0:36) When a furre says or emotes anything,
    (5:255) set message ~mcheck to what the triggering furre just said or emoted.
    (5:300) set variable %spamcheck.x to the value 0.
    (5:300) set variable %spamcheck.y to the value 0.
    (5:300) set variable %spamcheck2.x to the value 0.
    (5:300) set variable %spamcheck2.y to the value 0.
    (5:300) set variable %spamcheck3.x to the value 0.
    (5:300) set variable %spamcheck3.y to the value 0.

(0:36) When a furre says or emotes anything,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.x.
    (5:302) take variable %spamcheck.x and add 1000 to it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.x.

(0:36) When a furre says or emotes anything,
 (1:176) and the length of message ~mcheck is less than 29,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.y.
    (5:302) take variable %spamcheck.y and add 6 to it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.y.

(0:36) When a furre says or emotes anything,
 (1:76) and the length of message ~mcheck is greater than 28,
 (1:176) and the length of message ~mcheck is less than 57,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.y.
    (5:302) take variable %spamcheck.y and add 7 to it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.y.

(0:36) When a furre says or emotes anything,
 (1:76) and the length of message ~mcheck is greater than 56,
 (1:176) and the length of message ~mcheck is less than 89,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.y.
    (5:302) take variable %spamcheck.y and add 8 to it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.y.

(0:36) When a furre says or emotes anything,
 (1:76) and the length of message ~mcheck is greater than 88,
 (1:176) and the length of message ~mcheck is less than 172,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.y.
    (5:302) take variable %spamcheck.y and add 100 to it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.y.

(0:36) When a furre says or emotes anything,
 (1:76) and the length of message ~mcheck is greater than 171,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.y.
    (5:302) take variable %spamcheck.y and add 200 to it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.y.

(0:36) When a furre says or emotes anything,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is more than 0,
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck3.x.
    (5:308) divide variable %spamcheck3.x by 1000 and put the remainder in variable %spamcheck3.y.
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.y.
    (5:301) copy the value of variable %spamcheck.y into variable %spamcheck2.y.
    (5:308) divide variable %spamcheck.y by 100 and put the remainder in variable %spamcheck2.x.

(0:36) When a furre says or emotes anything,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:201) and variable %spamcheck3.y is more than 0,
 (1:202) and variable %spamcheck3.y is less than 101,
 (1:200) and variable %spamcheck2.x is equal to 0,
    (5:302) take variable %spamcheck2.y and add 10 to it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck2.y.

(0:36) When a furre says or emotes anything,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:201) and variable %spamcheck3.y is more than 0,
 (1:201) and variable %spamcheck2.x is more than 9,
    (5:304) take variable %spamcheck2.y and subtract 10 from it.
    (5:302) take variable %spamcheck2.y and add 100 to it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck2.y.

(0:73) When a furre doesn't speak (or emote) for 4 seconds,
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is greater than 999,
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.x.
    (5:304) take variable %spamcheck.x and subtract 1000 from it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.x.
(0:73) When a furre doesn't speak (or emote) for 5 seconds,
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is greater than 999,
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.x.
    (5:304) take variable %spamcheck.x and subtract 1000 from it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.x.
(0:73) When a furre doesn't speak (or emote) for 6 seconds,
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is greater than 999,
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.x.
    (5:304) take variable %spamcheck.x and subtract 1000 from it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.x.
(0:73) When a furre doesn't speak (or emote) for 7 seconds,
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is greater than 999,
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.x.
    (5:304) take variable %spamcheck.x and subtract 1000 from it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.x.
(0:73) When a furre doesn't speak (or emote) for 8 seconds,
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is greater than 999,
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.x.
    (5:304) take variable %spamcheck.x and subtract 1000 from it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck.x.

*Spam Warning*
(0:36) When a furre says or emotes anything,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is more than 3999,
 (1:603) and the PhoenixSpeak info {spam} about the triggering furre is less than 5000,
    (5:200) emit message {You are currently considered to be spamming, please stop now before you are forced to serve a 2 minute temporary ban or greater..} to the triggering furre.

*Spam-Killer*
(0:36) When a furre says or emotes anything,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is more than 5999,
 (1:620) and the PhoenixSpeak info {penalty2} about this dream is equal to 1,
    (5:612) remember the PhoenixSpeak info {penalty1} about this dream, and put it in variable %penalty.
    (5:302) take variable %penalty and add 1 to it.
    (5:600) memorize that the PhoenixSpeak info {sban} about the triggering furre will now be %penalty.
    (5:602) memorize that the PhoenixSpeak info {penalty1} about this dream will now be %penalty.
    (5:602) memorize that the PhoenixSpeak info {ptimer%penalty} about this dream will now be 120.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be 0.
    (5:300) set variable %penalty to the value 0.
    (5:200) emit message {You have been temporarly banned for spamming.. Nice work.. #SD} to the triggering furre.
    (5:78) eject the triggering furre.

(0:36) When a furre says or emotes anything,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is more than 5999,
 (1:622) and the PhoenixSpeak info {penalty2} about this dream is greater than 1,
    (5:612) remember the PhoenixSpeak info {penalty2} about this dream, and put it in variable %penalty.
    (5:304) take variable %penalty and subtract 1 from it.
    (5:600) memorize that the PhoenixSpeak info {sban} about the triggering furre will now be %penalty.
    (5:602) memorize that the PhoenixSpeak info {penalty2} about this dream will now be %penalty.
    (5:602) memorize that the PhoenixSpeak info {ptimer%penalty} about this dream will now be 120.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be 0.
    (5:300) set variable %penalty to the value 0.
    (5:200) emit message {You have been temporarly banned for spamming.. Nice work.. #SD} to the triggering furre.
    (5:78) eject the triggering furre.

(0:36) When a furre says or emotes anything,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is more than 0,
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck3.x.
    (5:308) divide variable %spamcheck3.x by 1000 and put the remainder in variable %spamcheck3.y.

(0:36) When a furre says or emotes anything,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
 (1:201) and variable %spamcheck3.y is more than 699,
 (1:620) and the PhoenixSpeak info {penalty2} about this dream is equal to 1,
    (5:612) remember the PhoenixSpeak info {penalty1} about this dream, and put it in variable %penalty.
    (5:302) take variable %penalty and add 1 to it.
    (5:600) memorize that the PhoenixSpeak info {sban} about the triggering furre will now be %penalty.
    (5:602) memorize that the PhoenixSpeak info {penalty1} about this dream will now be %penalty.
    (5:602) memorize that the PhoenixSpeak info {ptimer%penalty} about this dream will now be 120.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be 0.
    (5:300) set variable %penalty to the value 0.
    (5:300) set variable %spamcheck3.y to the value 0.
    (5:200) emit message {You have been temporarly banned for spamming.. Nice work.. #SD} to the triggering furre.
    (5:78) eject the triggering furre.

(0:36) When a furre says or emotes anything,
 (1:206) and variable %ignore.x is not equal to 1,
 (1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
 (1:201) and variable %spamcheck3.y is more than 699,
 (1:622) and the PhoenixSpeak info {penalty2} about this dream is greater than 1,
    (5:612) remember the PhoenixSpeak info {penalty2} about this dream, and put it in variable %penalty.
    (5:304) take variable %penalty and subtract 1 from it.
    (5:600) memorize that the PhoenixSpeak info {sban} about the triggering furre will now be %penalty.
    (5:602) memorize that the PhoenixSpeak info {penalty2} about this dream will now be %penalty.
    (5:602) memorize that the PhoenixSpeak info {ptimer%penalty} about this dream will now be 120.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be 0.
    (5:300) set variable %penalty to the value 0.
    (5:300) set variable %spamcheck3.y to the value 0.
    (5:200) emit message {You have been temporarly banned for spamming.. Nice work.. #SD} to the triggering furre.
    (5:78) eject the triggering furre.

*Deny/Allow Entry*
(0:9) When a furre arrives in the dream,
 (1:602) and the PhoenixSpeak info {sban} about the triggering furre is greater than 0,
    (5:610) remember the PhoenixSpeak info {sban} about the triggering furre, and put it in variable %penalty.

(0:9) When a furre arrives in the dream,
 (1:602) and the PhoenixSpeak info {sban} about the triggering furre is greater than 0,
 (1:622) and the PhoenixSpeak info {ptimer%penalty} about this dream is greater than 0,
    (5:200) emit message {You are still currently serving out your spam ban so best to try again later..} to the triggering furre.
    (5:78) eject the triggering furre.
    (5:300) set variable %penalty to the value 0.

(0:9) When a furre arrives in the dream,
 (1:602) and the PhoenixSpeak info {sban} about the triggering furre is greater than 0,
 (1:620) and the PhoenixSpeak info {ptimer%penalty} about this dream is equal to 0,
    (5:600) memorize that the PhoenixSpeak info {sban} about the triggering furre will now be 0.
    (5:200) emit message {Congratulations.. You are no longer banned for spamming. Best not let it happen again..} to the triggering furre.
    (5:300) set variable %penalty to the value 0.

*Sban Timer (The more spammers, the longer the punishment..)*
(0:100) When 1 seconds have passed, offset by 0,
 (1:622) and the PhoenixSpeak info {penalty1} about this dream is greater than 0,
 (1:620) and the PhoenixSpeak info {penalty1} about this dream is equal to %sbanclock,
    (5:300) set variable %sbanclock to the value 0.

(0:100) When 1 seconds have passed, offset by 0,
 (1:622) and the PhoenixSpeak info {penalty1} about this dream is greater than 0,
 (1:622) and the PhoenixSpeak info {penalty1} about this dream is greater than %sbanclock,
 (1:206) and variable %sbanclock is not equal to 0,
    (5:302) take variable %sbanclock and add 1 to it.

(0:100) When 1 seconds have passed, offset by 0,
 (1:622) and the PhoenixSpeak info {penalty1} about this dream is greater than 0,
 (1:622) and the PhoenixSpeak info {penalty1} about this dream is greater than %sbanclock,
 (1:200) and variable %sbanclock is equal to 0,
    (5:612) remember the PhoenixSpeak info {penalty2} about this dream, and put it in variable %sbanclock.

(0:100) When 1 seconds have passed, offset by 0,
 (1:622) and the PhoenixSpeak info {penalty1} about this dream is more than 0,
    (5:612) remember the PhoenixSpeak info {penalty1} about this dream, and put it in variable %pcheck.x.
    (5:612) remember the PhoenixSpeak info {penalty2} about this dream, and put it in variable %pcheck.y.

(0:100) When 1 seconds have passed, offset by 0,
 (1:620) and the PhoenixSpeak info {penalty2} about this dream is equal to %pcheck.x,
 (1:206) and variable %sbanclock is not equal to 0,
 (1:620) and the PhoenixSpeak info {ptimer%sbanclock} about this dream is equal to 0,
 (1:622) and the PhoenixSpeak info {penalty1} about this dream is more than 0,
    (5:632) forget the PhoenixSpeak info {penalty1} about this dream.
    (5:602) memorize that the PhoenixSpeak info {penalty2} about this dream will now be 1.
    (5:632) forget the PhoenixSpeak info {ptimer%sbanclock} about this dream.
    (5:300) set variable %sbanclock to the value 0.

(0:100) When 1 seconds have passed, offset by 0,
 (1:622) and the PhoenixSpeak info {penalty1} about this dream is more than %pcheck.y,
 (1:620) and the PhoenixSpeak info {ptimer%sbanclock} about this dream is equal to 0,
    (5:612) remember the PhoenixSpeak info {penalty2} about this dream, and put it in variable %ptimer.
    (5:302) take variable %ptimer and add 1 to it.
    (5:602) memorize that the PhoenixSpeak info {penalty2} about this dream will now be %ptimer.
    (5:632) forget the PhoenixSpeak info {ptimer%sbanclock} about this dream.
    (5:300) set variable %ptimer to the value 0.

(0:100) When 1 seconds have passed, offset by 0,
 (1:622) and the PhoenixSpeak info {penalty1} about this dream is greater than 0,
 (1:622) and the PhoenixSpeak info {ptimer%sbanclock} about this dream is greater than 0,
    (5:612) remember the PhoenixSpeak info {ptimer%sbanclock} about this dream, and put it in variable %ptimer.
    (5:304) take variable %ptimer and subtract 1 from it.
    (5:602) memorize that the PhoenixSpeak info {ptimer%sbanclock} about this dream will now be %ptimer.
    (5:300) set variable %ptimer to the value 0.

*Unban Spammer*
(0:32) When a furre says something with {^1^unsban } in it,
 (1:10) and the triggering furre is the dream owner,
 (1:610) and the PhoenixSpeak info {sban} about the furre named {[PARAM1]} is equal to 0,
    (5:200) emit message {[PARAM1] is currently not spam banned..} to the triggering furre.

(0:32) When a furre says something with {^1^unsban } in it,
 (1:10) and the triggering furre is the dream owner,
 (1:612) and the PhoenixSpeak info {sban} about the furre named {[PARAM1]} is greater than 0,
    (5:601) memorize that the PhoenixSpeak info {sban} about the furre named {[PARAM1]} will now be 0.
    (5:200) emit message {[PARAM1] has been unbanned.} to the triggering furre.

*Long Term Timer* (Place this section at the bottom of your DS Editor to prevent anti-idle issues with other scripts)
(0:36) When a furre says or emotes anything,
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is more than 0,
  (3:7) whereever the triggering furre was at when the trigger activated,
    (5:19) move any furre present 0 step(s) forward (in the direction they're facing) if there's nobody already there.

(0:72) When a furre remains motionless (doesn't turn, sit, stand or move) for 1 seconds,
    (5:300) set variable %spamcheck.x to the value 0.
    (5:300) set variable %spamcheck.y to the value 0.
    (5:300) set variable %spamcheck2.x to the value 0.
    (5:300) set variable %spamcheck2.y to the value 0.
    (5:300) set variable %spamcheck3.x to the value 0.
    (5:300) set variable %spamcheck3.y to the value 0.

(0:72) When a furre remains motionless (doesn't turn, sit, stand or move) for 1 seconds,
 (1:602) and the PhoenixSpeak info {spam} about the triggering furre is more than 0,
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck3.x.
    (5:308) divide variable %spamcheck3.x by 1000 and put the remainder in variable %spamcheck3.y.
    (5:610) remember the PhoenixSpeak info {spam} about the triggering furre, and put it in variable %spamcheck.y.
    (5:301) copy the value of variable %spamcheck.y into variable %spamcheck2.y.
    (5:308) divide variable %spamcheck.y by 100 and put the remainder in variable %spamcheck2.x.

(0:72) When a furre remains motionless (doesn't turn, sit, stand or move) for 1 seconds,
 (1:201) and variable %spamcheck3.y is more than 99,
 (1:200) and variable %spamcheck2.x is equal to 0,
    (5:304) take variable %spamcheck2.y and subtract 100 from it.
    (5:302) take variable %spamcheck2.y and add 10 to it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck2.y.
    (5:300) set variable %spamcheck2.x to the value 0.
    (5:300) set variable %spamcheck3.y to the value 0.
  (3:7) whereever the triggering furre was at when the trigger activated,
    (5:19) move any furre present 0 step(s) forward (in the direction they're facing) if there's nobody already there.

(0:72) When a furre remains motionless (doesn't turn, sit, stand or move) for 1 seconds,
 (1:201) and variable %spamcheck3.y is more than 0,
 (1:201) and variable %spamcheck2.x is more than 0,
    (5:304) take variable %spamcheck2.y and subtract 1 from it.
    (5:600) memorize that the PhoenixSpeak info {spam} about the triggering furre will now be %spamcheck2.y.
    (5:300) set variable %spamcheck2.x to the value 0.
    (5:300) set variable %spamcheck3.y to the value 0.
  (3:7) whereever the triggering furre was at when the trigger activated,
    (5:19) move any furre present 0 step(s) forward (in the direction they're facing) if there's nobody already there.
